<%@ page import="com.infitecs.eyas.mill.model.Mill" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%@ page import="com.infitecs.eyas.mill.model.MillSelect" %>
<%@ page import="com.infitecs.eyas.util.NumberUtil" %>
<%--
  Created by IntelliJ IDEA.
  User: Demon-pro
  Date: 2015/6/26
  Time: 9:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <%@include file="../includes/head.jsp" %>
    <title>${menu.menuName}</title>
</head>
<%
    List<Mill> millList = (List<Mill>) request.getAttribute("millList");
    Map<String, Double> dataMap = (Map<String, Double>) request.getAttribute("dataMap");
    MillSelect millSelect = (MillSelect) request.getAttribute("millSelect");
    String model =millSelect==null?"":millSelect.getModel();
    String value1= "";
    String value2= "";
    String value3= "";
    String value4= "";
    String value5= "";
    String value6= "";
    String value7= "";
    String value8= "";
    String E37= "";
    if (dataMap != null) {
        double E7 = dataMap.get("E7");
        //value1
        //value2
        //value3
        if (E7 <= 6) {
            value1 = NumberUtil.trimZero(dataMap.get("E13") + "");
            value2 = NumberUtil.trimZero(dataMap.get("E17") + "");
            value3 = NumberUtil.trimZero(dataMap.get("E21") + "");
        }
        if (E7 == 7) {
            value1 = NumberUtil.trimZero(dataMap.get("E14") + "");
            value2 = NumberUtil.trimZero(dataMap.get("E18") + "");
            value3 = NumberUtil.trimZero(dataMap.get("E22") + "");
        }

        if (E7 == 8) {
            value1 = NumberUtil.trimZero(dataMap.get("E15") + "");
            value2 = NumberUtil.trimZero(dataMap.get("E19") + "");
            value3 = NumberUtil.trimZero(dataMap.get("E23") + "");
        }
        if (E7 == 9) {
            value1 = NumberUtil.trimZero(dataMap.get("E16") + "");
            value2 = NumberUtil.trimZero(dataMap.get("E20") + "");
            value3 = NumberUtil.trimZero(dataMap.get("E24") + "");
        }
        //value4
        if (E7 == 7) {
            value4 = "1.2";
        } else {
            value4 = "1";
        }
        //value5
        if (E7 == 9) {
            value5 = "0.9";
        } else {
            value5 = "1";
        }
        //value6
        if (E7 <= 7) {
            value6 = "0.95";
        } else if (E7 == 8) {
            value6 = "0.9";
        } else {
            value6 = "";
        }
        value7= NumberUtil.trimZero(dataMap.get("E32") + "");
        //value8
        if (E7 <= 7) {
            value8 = NumberUtil.trimZero(dataMap.get("E40") + "");
        } else {
            value8 = NumberUtil.trimZero(dataMap.get("E41") + "");
        }
        if(dataMap.get("E35")<=1.1){
            E37="不合格";
        }else {
            E37= NumberUtil.trimZero(dataMap.get("E37") + "");       ;
        }
    }
%>
<body class="page-header-fixed page-quick-sidebar-over-content">
<%@include file="../includes/top.jsp" %>
<div class="page-container">
    <%@include file="../includes/sidebar.jsp" %>
    <div class="page-content-wrapper">
        <div class="page-content">
            <%@include file="../includes/current.jsp" %>
            <div class="row">
                <div class="col-md-12">
                    <div class="portlet box">
                        <div class="portlet-body form">
                            <div class="form-body">
                                <!--修正系数开始-->
                                <div class="col-md-6 col-md-offset-3">
                                    <div class="col-md-12 margin-bottom-10">
                                        <h2>修正系数</h2>
                                    </div>
                                    <div class="col-md-12">
                                        <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                            <div class="form-group">
                                                <label class="control-label col-md-4" style="padding-left: 0"
                                                        >可磨性指数的修正系数</label>

                                                <div class="col-md-8">
                                                    <input type="text" class="form-control input-inline"
                                                           readonly id="E13" value="<%=value1%>"
                                                           />
                                                    <span class="help-inline">
                                                        /
                                                    </span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                            <div class="form-group">
                                                <label class="control-label col-md-4" style="padding-left: 0"
                                                        >煤粉细度的修正系数</label>

                                                <div class="col-md-8">
                                                    <input type="text" class="form-control input-inline" readonly   value="<%=value2%>">
                                                    <span class="help-inline">
                                                        /
                                                    </span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                            <div class="form-group">
                                                <label class="control-label col-md-4" style="padding-left: 0"
                                                        >原煤水分的修正系数</label>

                                                <div class="col-md-8">
                                                    <input type="text" class="form-control input-inline"
                                                           readonly      id="E21"  value="<%=value3%>"/>
                                                    <span class="help-inline">
                                                        /
                                                    </span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                            <div class="form-group">
                                                <label class="control-label col-md-4" style="padding-left: 0"
                                                        >原煤灰份的修正系数</label>

                                                <div class="col-md-8">
                                                    <input type="text" class="form-control input-inline"
                                                           readonly   value="<%=value4%>"   />
                                                    <span class="help-inline">
                                                       /
                                                    </span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                            <div class="form-group">
                                                <label class="control-label col-md-4" style="padding-left: 0"
                                                        >原煤粒度修正系数</label>

                                                <div class="col-md-8">
                                                    <input type="text" class="form-control input-inline" readonly  value="<%=value5%>" >
                                                    <span class="help-inline">
                                                        /
                                                    </span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                            <div class="form-group">
                                                <label class="control-label col-md-4" style="padding-left: 0"
                                                        >中期衰减的修正系数</label>

                                                <div class="col-md-8">
                                                    <input type="text" class="form-control input-inline" readonly   value="<%=value6%>">

                                                    <span class="help-inline">
                                                        /
                                                    </span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                            <div class="form-group">
                                                <label class="control-label col-md-4" style="padding-left: 0"
                                                        >分离器修正系数</label>

                                                <div class="col-md-8">
                                                    <input type="text" class="form-control input-inline" readonly  value="<%=value7%>" >
                                                    <span class="help-inline">
                                                        /
                                                    </span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!--修正系数结束-->
                                <div class="clearfix"></div>
                                <!--左边开始-->
                                <div class="col-md-6">
                                    <!--出力计算开始-->
                                    <div class="col-md-12 margin-bottom-10">
                                        <!--标题开始-->
                                        <div class="col-md-12 margin-bottom-10">
                                            <h2>出力计算</h2>
                                        </div>
                                        <!--标题结束-->
                                        <!--内容开始-->
                                        <div class="col-md-12 margin-bottom-10">
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">磨煤机计算出力</label>

                                                    <div class="col-md-8">
                                                        <input type="text" class="form-control input-inline" readonly
                                                    value="<%=dataMap!=null?NumberUtil.trimZero(dataMap.get("E10") + ""):""%>"
                                                                >
                                                            <span class="help-inline">
                                                                t/h
                                                            </span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">要求磨煤机最小基本出力</label>

                                                    <div class="col-md-8">
                                                        <input type="text" class="form-control input-inline" readonly
                                                               value="<%=dataMap!=null?NumberUtil.trimZero(dataMap.get("E33") + ""):""%>"
                                                                >
                                                            <span class="help-inline">
                                                                t/h
                                                            </span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">磨煤机基本出力</label>

                                                    <div class="col-md-8">
                                                        <input type="text" class="form-control input-inline" readonly
                                                               value="<%=dataMap!=null?NumberUtil.trimZero(dataMap.get("E34") + ""):""%>"
                                                                >
                                                            <span class="help-inline">
                                                                t/h
                                                            </span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">磨煤机保证出力</label>

                                                    <div class="col-md-8">
                                                        <input type="text" class="form-control input-inline" readonly
                                                               value="<%=dataMap!=null?NumberUtil.trimZero(dataMap.get("E35") + ""):""%>"
                                                                >
                                                            <span class="help-inline">
                                                                t/h
                                                            </span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">磨煤机最大出力</label>

                                                    <div class="col-md-8">
                                                        <input type="text" class="form-control input-inline" readonly
                                                               value="<%=dataMap!=null?NumberUtil.trimZero(dataMap.get("E36") + ""):""%>"
                                                                >
                                                            <span class="help-inline">
                                                                t/h
                                                            </span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">磨损中后期储备系数</label>

                                                    <div class="col-md-8">
                                                        <input type="text" class="form-control input-inline" readonly
                                                               value="<%=E37%>"
                                                                >
                                                            <span class="help-inline">
                                                                /
                                                            </span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">计算出力下负荷率</label>

                                                    <div class="col-md-8">
                                                        <input type="text" class="form-control input-inline" readonly
                                                               value="<%=dataMap!=null?NumberUtil.trimZero(dataMap.get("E38") + ""):""%>"
                                                                >
                                                            <span class="help-inline">
                                                                %
                                                            </span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">磨煤机型号(勾选后可修改)</label>

                                                    <div class="col-md-8">
                                                    <select id="model" disabled="true">
                                                        <%
                                                            if(millList!=null){
                                                         for(int i=0;i<millList.size();i++){
                                                           Mill mill =millList.get(i);
                                                        %>
                                                        <option id="<%=mill.getModel()%>"
                                                                <%=mill.getModel().equals(model)?"selected":""%>
                                                                ><%=mill.getModel()%></option>
                                                        <%
                                                                }
                                                            }
                                                        %>
                                                    </select>

                                                    <span class="help-inline">
                                                        <input type="checkbox" id="modelState"
                                                               name="modelState"
                                                        <c:if test="${millSelect!=null&&operateField.modelState=='1'}">
                                                               checked
                                                        </c:if> >
                                                    </span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--内容结束-->
                                    </div>
                                    <!--出力计算结束-->
                                </div>
                                <!--左边结束-->
                                <!--右边开始-->
                                <div class="col-md-6">
                                    <!--通风阻力计算开始-->
                                    <div class="col-md-12 margin-bottom-10">
                                        <!--标题开始-->
                                        <div class="col-md-12 margin-bottom-10">
                                            <h2>通风阻力计算</h2>
                                        </div>
                                        <!--标题结束-->
                                        <!--内容开始-->
                                        <div class="col-md-12 margin-bottom-10">
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">磨煤机最大出力下通风阻力</label>

                                                    <div class="col-md-8">
                                                        <input type="text" class="form-control input-inline" readonly
                                                               value="<%=dataMap!=null?NumberUtil.trimZero(dataMap.get("E39") + ""):""%>"
                                                                >
                                                            <span class="help-inline">
                                                                Pa
                                                            </span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">磨煤机计算出力下通风阻力</label>

                                                    <div class="col-md-8">
                                                        <input type="text" class="form-control input-inline" readonly
                                                               value="<%=dataMap!=null?NumberUtil.trimZero(value8+ ""):""%>"
                                                                >
                                                            <span class="help-inline">
                                                               Pa
                                                            </span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">磨煤机计算出力下通风阻力<br>
                                                        (当地气压修正后)
                                                    </label>

                                                    <div class="col-md-8">
                                                        <input type="text" class="form-control input-inline" readonly
                                                               value="<%=dataMap!=null?NumberUtil.trimZero(dataMap.get("E42") + ""):""%>"
                                                                >
                                                            <span class="help-inline">
                                                                Pa
                                                            </span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--内容结束-->
                                    </div>
                                    <!--通风阻力计算结束-->
                                    <!--功率计算开始-->
                                    <div class="col-md-12 margin-bottom-10">
                                        <!--标题开始-->
                                        <div class="col-md-12 margin-bottom-10">
                                            <h2>功率计算</h2>
                                        </div>
                                        <!--标题结束-->
                                        <!--内容开始-->
                                        <div class="col-md-12 margin-bottom-10">
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">磨煤机主电动机功率</label>

                                                    <div class="col-md-8">
                                                        <input type="text" class="form-control input-inline" readonly
                                                               value="<%=dataMap!=null?NumberUtil.trimZero(dataMap.get("E43") + ""):""%>"
                                                                >
                                                            <span class="help-inline">
                                                                KW
                                                            </span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">磨煤机最大出力下电动机输入功率</label>

                                                    <div class="col-md-8">
                                                        <input type="text" class="form-control input-inline" readonly
                                                               value="<%=dataMap!=null?NumberUtil.trimZero(dataMap.get("E44") + ""):""%>"
                                                                >
                                                            <span class="help-inline">
                                                               KW
                                                            </span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">磨煤机计算出力下电动机输入功率
                                                    </label>

                                                    <div class="col-md-8">
                                                        <input type="text" class="form-control input-inline" readonly
                                                               value="<%=dataMap!=null?NumberUtil.trimZero(dataMap.get("E45") + ""):""%>"
                                                                >
                                                            <span class="help-inline">
                                                                KW
                                                            </span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">磨煤机计算出力下轴动率
                                                    </label>

                                                    <div class="col-md-8">
                                                        <input type="text" class="form-control input-inline" readonly
                                                               value="<%=dataMap!=null?NumberUtil.trimZero(dataMap.get("E46") + ""):""%>"
                                                                >
                                                            <span class="help-inline">
                                                                KW
                                                            </span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-12 margin-bottom-10" style="padding-left: 0">
                                                <div class="form-group">
                                                    <label class="control-label col-md-4"
                                                           style="padding-left: 0">最大出力下减速机要求轴功率
                                                    </label>
                                                    <div class="col-md-8">
                                                        <input type="text" class="form-control input-inline" readonly
                                                               value="<%=dataMap!=null?NumberUtil.trimZero(dataMap.get("E47") + ""):""%>"
                                                                >
                                                            <span class="help-inline">
                                                                KW
                                                            </span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--内容结束-->
                                    </div>
                                    <!--功率计算结束-->
                                </div>
                                <div class="form-body">
                                <div class="row">
                                    <div class="col-md-5">
                                    </div>
                                    <div class="col-md-7">
                                        <button type="button" class="btn green" id="save"
                                                onclick="Calculate.calculateSave()">确定
                                        </button>
                                        <button type="button" class="btn green" id="nextPage"
                                                >下一页
                                        </button>
                                    </div>
                                    <!--/span-->
                                </div>
                                <!--/span-->
                            </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<input type="hidden" id="caseId" value="${caseId}" name="caseId">
<%@include file="../includes/footer.jsp" %>
<%@include file="../includes/bottomscript.jsp" %>
<script src="<c:url value="/js/mill/Calculate1.js"/>" type="text/javascript"></script>
<script>
    $(document).ready(function () {
        var caseId = $("#caseId").val();
        var step = '<%=request.getAttribute("step")==null?"":request.getAttribute("step")%>'
        if (caseId == "" || step != "") {
            var obj = getUrlByStep(step)
            toast.error(obj.message);
            setTimeout(function () {
                window.location.href = obj.url;
            }, 1200);
        }
        <%
         String message = (String) request.getAttribute("message");
         if(message!=null&&!"".equals(message)){
         if(message.equals("success")){
         %>
        toast.success("操作成功");
        <%
        }else{
        %>
        toast.error("<%=request.getAttribute("message")%>");
        <%
         }
            }
       %>
        Calculate.init();
        Calculate.modelStateClick($("#modelState"));

    })
</script>
</body>
</html>
